<template>
  <div>
    <pannel v-for="(item,index) in arr" :key="index+''"
    :ind="index"
    :name="item"
    @click="delfn"
    ></pannel>
    <button @click="btn">生成</button>
  </div>
</template>

<script>
import pannel from './components/02.vue'
export default {
  data () {
    return {
      arr:[1,3,5,6,8]
    }
  },
components: {
  pannel
},
methods: {
  delfn(ind){
    this.arr.splice(ind, 1);
  },
  btn(){
    this.arr.push(Math.floor(Math.random() * 20))
  }
}
}
</script>

<style>

</style>